import { ObjectType, Field, Int } from '@nestjs/graphql';

@ObjectType()
export class QueryRes<T> {
  @Field({ nullable: true, description: '返回结果' })
  result: T;

  @Field(type => Int, { nullable: false, description: '返回的code' })
  code: number;

  @Field({ description: '提示信息' })
  message: string;
}